package com.derive.education_service.web.admin.service;

import com.derive.education_service.common.global.Paper;
import com.derive.education_service.common.global.ResponseMessage;
import com.derive.education_service.entity.Admin;
import com.derive.education_service.web.admin.bean.dto.AdminAddDto;
import com.derive.education_service.web.admin.bean.dto.AdminUpDto;
import com.derive.education_service.web.admin.bean.dto.QueryParam;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

/**
 * 管理员操作接口
 */
@Component
public interface AdminMegService {
    // 添加管理员 -- 超管权限
    ResponseMessage addAdminInfo(HttpServletRequest request, AdminAddDto adminAddDto);

    // 删除管理员 -- 超管权限 -- 需要检查是否有关联的机构数据(不建议使用)
    ResponseMessage delAdmin(HttpServletRequest request, int adminId);

    // 管理员编辑自己信息
    ResponseMessage upAdmin(HttpServletRequest request, AdminUpDto adminUpDto);

    // 给管理员分配角色权限 -- 超管权限(为了安全，可以加密)
    ResponseMessage allotRole(HttpServletRequest request, int roleId, int adminId);

    // 禁用管理员 -- 超管权限 isState == false
    ResponseMessage banAdmin(HttpServletRequest request, int adminId);

    // 启用管理员 -- 超管权限 isState == true
    ResponseMessage startAdmin(HttpServletRequest request, int adminId);

    // 管理员修改密码 -- 管理员需要注册更多信息以供验证

    // 获取管理员列表数据 -- 超管权限
    ResponseMessage getAdminList(HttpServletRequest request, QueryParam queryParam);
}
